package fr.insalyon.sims.broadcast.network;

/**
 * This class provide the access to data information and data source
 * 
 * @author GONZALEZ Silvia, GOTTERO Jeremie, SATTAYAKAWEE Nutchanat
 *
 */
public class DataEvent {
	// ------------------------------------------------------- CONSTANTS -- //
	// ------------------------------------------------------ ATTRIBUTES -- //
	
	/**
	 * data source
	 */
	private IStream source;
	
	/**
	 * data
	 */
	private byte[] data;
	/**
	 *  data offset
	 */
	private int offset;
	/**
	 * data length
	 */
	private int length;
	
	// ---------------------------------------------------- CONSTRUCTORS -- //
	
	public DataEvent(IStream source, byte[] data, int offset,
			int length) {
		this.source = source;
		this.data = data;
		this.offset = offset;
		this.length = length;
	}
	
	// --------------------------------------------------------- METHODS -- //
	
	public IStream getSource() {
		return source;
	}
	
	public byte[] getData() {
		return data;
	}
	
	public int getOffset() {
		return offset;
	}
	
	public int getLength() {
		return length;
	}
	
	// ------------------------------------------------- PRIVATE METHODS -- //
	// --------------------------------------------------- INNER CLASSES -- //
}
